
def check_integer_input():
    try:
        num1 = int(input("请输入第一个数："))
        num2 = int(input("请输入第二个数："))
        print('选择运算符')
        print('1.加　2.减　3.乘法　4.除')
        choice = int(input('请输入编号：'))
        if choice == 1:
            c = num1 + num2
            print("相加结果为：", c)
        elif choice == 2:
            c = num1 - num2
            print("相减结果为：", c)
        elif choice == 3:
            c = num1 * num2
            print("相乘结果为：", c)
        elif choice == 4:
            c = num1 / num2
            print("相除结果为：", c)
        else:
            print('输入错误，请重新输入')
    except ValueError:
        print("输入有误，请重新运行!")
        check_integer_input()
check_integer_input()


